Skip to content

surgical YAML patches + twig sync audit (#529)#533

Draft
PolyphonyRequiem wants to merge 1 commit into
mainfrom
squad/529-yaml-patches-twig-sync
Draft

surgical YAML patches + twig sync audit (#529)#533
PolyphonyRequiem wants to merge 1 commit into
mainfrom
squad/529-yaml-patches-twig-sync

Conversation

@PolyphonyRequiem

Copy link
Copy Markdown
Owner

Summary

Three surgical YAML patches surfaced from the 2026-05-28 squad fan-out (#522), plus a twig sync audit.

Closes #529.


Patches

Patch 1 — github-pr.yaml: add already_merged_emitter output branch

Mirrors ado-pr.yaml:139-148. The already_merged_emitter agent existed at line 437 but was not referenced in the output block — callers received merged=false and an empty pr_url on re-entry when the operator had already merged the PR through the GitHub UI.

Changes (output block, lines 97-109):

  • merged: added {%- elif already_merged_emitter is defined -%}true before closed_unmerged_emitter
  • pr_url: replaced closed_unmerged_emitter.output.pr_url fallback with poll_status.output.pr_url — matching ado-pr.yaml's pattern and covering all non-merger exit paths uniformly
  • Updated comment to list both already_merged_emitter and closed_unmerged_emitter as valid non-merger exits

Patch 2 — close-out.yaml:43: | json| tojson

| json is not a standard Jinja2 filter. Depending on conductor version it silently passes through the raw object repr or raises a template error. Correct filter is | tojson.

Patch 3 — plan-level.yaml / root-item-dispatch.yaml: bubble-up verified complete

Cross-checked both files. validate_scope_verdict and scope_violation_files are already present in both output blocks with correct Jinja guards ({%- if -%} in root-item-dispatch, {% if %} consistent with other plan-level fields). No code change required — wiring is end-to-end correct.


Twig sync audit

Grepped all .conductor/registry/workflows/*.yaml for twig state invocations and checked the following ~10 lines for twig sync.

Workflow Line Call Post-state sync?
implement-merge-group.yaml 1218 twig state $validate.target_state ✅ line 1219
polyphony.yaml 1206 In prompt text (not a command) ✅ N/A
polyphony.yaml 1425 twig state $validate.target_state --id ... ✅ line 1426
root-item-dispatch.yaml 465 In comment (not a command) ✅ N/A
root-item-dispatch.yaml 475 In comment (not a command) ✅ N/A
root-item-dispatch.yaml 498 twig state $validate.target_state --id ... ✅ line 499

All 3 actual twig state call sites already have a post-state twig sync. No follow-up issues required.


Lint

  • lint-github-pr.ps1: PASS
  • lint-strict-undefined.ps1: PASS (15 workflows)
  • lint-plan-level.ps1: PASS
  • tests/lint-sync-after-mutation.ps1: PASS

Conflict note

Wagner is on squad/528-error-gate-migration and may touch close-out.yaml. This PR's edit is line 43 only (| json| tojson). If a conflict surfaces, this PR rebases on the larger.

- github-pr.yaml: add already_merged_emitter branch on merged/pr_url
  outputs (mirrors ado-pr.yaml:139-148); pr_url fallback changed to
  poll_status (same cleanup ado-pr.yaml uses — covers all non-merger
  exit paths uniformly)
- close-out.yaml:43: | json → | tojson (correct Jinja2 filter)
- plan-level.yaml/root-item-dispatch.yaml: validate_scope_verdict +
  scope_violation_files already fully wired; cross-check confirmed
  both fields present end-to-end with correct guards — no code change
- Audit: twig state callers checked for post-state twig sync;
  0 missing — all 3 real callers already compliant

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PolyphonyRequiem PolyphonyRequiem added the squad:sibelius Owner: Sibelius (Twig/ADO) label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squad:sibelius Owner: Sibelius (Twig/ADO)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Surgical YAML patches: github-pr.yaml, close-out.yaml, plan-level.yaml + twig sync audit

1 participant